package com.example.myFirstWebmagic.schedule;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Component("schedulingSwitchRepository")
@Repository
public interface SchedulingSwitchRepository extends JpaRepository<EnSchedulingSwitch, String>{

	/**
	 * 
	 * @Description: 修改调度开关
	 * @param @param scheduleName
	 * @param @param Sswitch   
	 * @return void  
	 * @throws
	 * @author xiongyao
	 * @date 2017年3月3日
	 */
	@Modifying
	@Query("update EnSchedulingSwitch s set s.sswitch = ?1 where s.scheduleName = ?2")
	void updateEnSchedulingSwitchSswitch(String Sswitch,String scheduleName);

	/**
	 * 
	 * @Description: 查询调度开关
	 * @param @param ScheduleName
	 * @param @return   
	 * @return SchedulingSwitch  
	 * @throws
	 * @author xiongyao
	 * @date 2017年3月3日
	 */
	public EnSchedulingSwitch findByScheduleName(String ScheduleName);
}
